namespace ZR.Model.Models.ProductionControl
{
    /// <summary>
    /// 通信配置
    /// </summary>
    [SugarTable("communication_config")]
    public class CommunicationConfig : BaseEntity
    {
        /// <summary>
        /// 序号
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
        public int Id { get; set; }

        /// <summary>
        /// 产线代号
        /// </summary>
        [SugarColumn(ColumnName = "line_code")]
        public string LineCode { get; set; }

        /// <summary>
        /// 工位代号
        /// </summary>
        [SugarColumn(ColumnName = "station_code")]
        public string StationCode { get; set; }

        /// <summary>
        /// plc IP地址
        /// </summary>
        [SugarColumn(ColumnName = "plc_ip")]
        public string PlcIp { get; set; }

        /// <summary>
        /// 点位信号地址
        /// </summary>
        [SugarColumn(ColumnName = "item_address")]
        public string ItemAddress { get; set; }

        /// <summary>
        /// 点位序号
        /// </summary>
        [SugarColumn(ColumnName = "item_no")]
        public int ItemNo { get; set; }

        /// <summary>
        /// 点位名称
        /// </summary>
        [SugarColumn(ColumnName = "item_name")]
        public string ItemName { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [SugarColumn(ColumnName = "communicate_rank")]
        public int CommunicateRank { get; set; }

        /// <summary>
        /// 点位类型
        /// </summary>
        [SugarColumn(ColumnName = "item_type")]
        public string ItemType { get; set; }

        /// <summary>
        /// 触发条件
        /// </summary>
        [SugarColumn(ColumnName = "trigger_condition")]
        public string TriggerCondition { get; set; }

        /// <summary>
        /// 点位数据类型
        /// </summary>
        [SugarColumn(ColumnName = "item_data_type")]
        public string ItemDataType { get; set; }

        /// <summary>
        /// 写入值
        /// </summary>
        [SugarColumn(ColumnName = "item_writeIn_value")]
        public string ItemWriteinValue { get; set; }

        /// <summary>
        /// 订阅状态
        /// </summary>
        [SugarColumn(ColumnName = "subscribe_state")]
        public bool SubscribeState { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "creation_time")]
        public DateTime? CreationTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnName = "creator_name")]
        public string CreatorName { get; set; }

        /// <summary>
        /// 数据块地址
        /// </summary>
        [SugarColumn(ColumnName = "block_address")]
        public int BlockAddress { get; set; }

        /// <summary>
        /// 数据块长度
        /// </summary>
        [SugarColumn(ColumnName = "block_length")]
        public int BlockLength { get; set; }
    }
}